<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div>
    <input type="text" v-model="num1">
    <input type="text" v-model="num2">
    <input type="button" value="加" @click="f1()">
    <input type="button" value="减" @click="f2()">
    <input type="button" value="乘" @click="f3()">
    <input type="button" value="除" @click="f4()">
    <h1>{{info}}</h1>
</div>
    <script src="../js./vue.min.js"></script>
    <script>
         let v = new Vue({
            el: "body>div",
            data:{
                info:"",
                num1:"",
                num2:""
            },
            methods:{
                f1(){
                    v.info=v.num1+v.num2;
                },
                f2(){
                    v.info=v.num1-v.num2;
                },
                f3(){
                    v.info=v.num1*v.num2;
                },
                f4(){
                    v.info=v.num1/v.num2;
                }
            }    
        })

    </script>
</body>
</html>